package info.webest.media.coverflow;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class CoverFlowActivity extends Activity {

	private String folder;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		Intent intent = getIntent();

		if (intent != null) {
			Bundle bundle = intent.getExtras();
			if (bundle != null) {
				folder = bundle.getString("Folder");
			}
		}

		// CoverFlow coverFlow;
		CoverFlow coverFlow = new CoverFlow(this);

		ImageAdapter coverImageAdapter = new ImageAdapter(this, folder);
		// coverImageAdapter.createReflectedImages();
		coverFlow.setAdapter(coverImageAdapter);

		coverFlow.setSpacing(-25);
		coverFlow.setSelection(4, true);
		coverFlow.setAnimationDuration(1000);

		setContentView(coverFlow);
	}

}